projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
082471a
)
Adjust time struct before mkgmtime/mktime when date/time buffer doesn't have a date.
author
oliskoli
<oliskoli>
Tue, 5 Jun 2007 20:54:40 +0000
(20:54 +0000)
committer
oliskoli
<oliskoli>
Tue, 5 Jun 2007 20:54:40 +0000
(20:54 +0000)
csv_util.c
patch
|
blob
|
history
diff --git
a/csv_util.c
b/csv_util.c
index d3e760abf7a99c71fc9e24c38bd4361ac5fa1ed8..ab559378e3f70d5f2b97c4e6e3f441d69658c94f 100644
(file)
--- a/
csv_util.c
+++ b/
csv_util.c
@@
-683,6
+683,11
@@
sscanftime( const char *s, const char *format, const int gmt )
if ( strptime( s, format, &stm ) )
{
+ if ((stm.tm_mday == 0) && (stm.tm_mon == 0) && (stm.tm_year == 0)) {
+ stm.tm_mday = 1;
+ stm.tm_mon = 0;
+ stm.tm_year = 70;
+ }
stm.tm_isdst = -1;
if (gmt)
return mkgmtime(&stm);